import router from '@/router'

export default response => {
// 根据返回的code值来做不同的处理（和后端约定）
    console.log(response);
    //登录失效
    if(response.data.code == 500){
        localStorage.clear();
        sessionStorage.clear();
        router.push('/login');
    }
    return response
}
